package com.abing.starry.service;

import com.abing.starry.model.entity.UserEntity;
import com.abing.starry.model.request.user.OpsUserRequest;
import com.abing.starry.model.request.user.QueryUserRequest;
import com.abing.starry.model.request.user.UserLoginRequest;
import com.abing.starry.model.vo.LoginCaptchaVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * @Author CaptainBing
 * @Date 2023/11/8 22:03
 * @Description
 */
public interface UserService extends IService<UserEntity> {


    /**
     * 用户注册
     * @param userLoginRequest
     * @return
     */
    boolean userRegister(UserLoginRequest userLoginRequest);

    /**
     * 用户登出
     * @return
     */
    boolean userLogout();

    /**
     * 发送验证码
     * @param userAccount
     * @return
     */
    boolean sendCaptcha(String userAccount);

    /**
     * 获取当前用户
     * @return
     */
    UserEntity getCurrentUser();

    IPage<UserEntity> queryUserByPage(QueryUserRequest queryUserRequest);

    /**
     * 生成图形验证码
     * @return
     */
    LoginCaptchaVO fetchCaptchaToBase64();

    /**
     * 操作用户
     * @param opsUserRequest
     * @return
     */
    boolean opsUserById(OpsUserRequest opsUserRequest);
}
